<?php
/**
 * Date: 03.05.14
 */
$rules = array(
    'login'=>'/site/login',
    'admin' => '/Admin/default',

    'obnovit/glavnuu' => '/Admin/main/update',

    'obnovit/polzovatela' => '/Admin/user/update',

    'obnovit/kontakty' => '/Admin/contacts/update',

    'spisok/statei' => '/Admin/article/admin',
    'dobavit/statju' => '/Admin/article/create',
    'obnovit/statju/<id:\d+>' => '/Admin/article/update',
    'udalit/statju/<id:\d+>' => '/Admin/article/delete',

    'spisok/novostei' => '/Admin/news/admin',
    'dobavit/novost' => '/Admin/news/create',
    'obnovit/novost/<id:\d+>' => '/Admin/news/update',
    'udalit/novost/<id:\d+>' => '/Admin/news/delete',

    'spisok/kategorii' => '/Admin/category/admin',
    'derevo/kategorii' => '/Admin/category/tree',
    'dobavit/kategoriu' => '/Admin/category/create',
    'obnovit/kategoriu/<id:\d+>' => '/Admin/category/update',
    'udalit/kategoriu/<id:\d+>' => '/Admin/category/delete',
    'tovary/kategorii/<id:\d+>'=> '/Admin/category/view',

    'spisok/tovarov' => '/Admin/product/admin',
    'derevo/kategorii' => '/Admin/category/tree',
    'dobavit/tovar' => '/Admin/product/create',
    'obnovit/tovar/<id:\d+>' => '/Admin/product/update',
    'udalit/tovar/<id:\d+>' => '/Admin/product/delete',
    
    'spisok/zakazov' => '/Admin/order/admin',

    'nastroiki' => 'Admin/config/admin',

    '/home' => '/Main/default/index',
    '/stati' => '/Article/default/index',
    '/statja/id/<id:\d+>' => '/Article/default/show',
    '/novosti' => '/News/default/index',
    '/kontakty' => '/Contacts/default/index',
	'/tovar/<id:\d+>'=>'/Product/default/index',
    'subkatalog/id/<id:\d+>' => '/Category/default/list',
    'katalog' => '/Category/default/index',
    'dobavit_v_korzinu' => '/Category/cart/addToCart',
    'korzina' => '/Category/cart/showCart',

    '<controller:\w+>/<id:\d+>'=>'<controller>/view',
    '<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<module>/<controller>/<action>',
    '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
    '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
);
